<template>
  <div class="detail-container">
    <van-tabs v-model="menuActive" sticky color="#5691f6" @change="changeTab">
      <van-tab title="组态">
        <Zutai :embedUrl="embedUrl" />
      </van-tab>
      <van-tab title="历史报警">
        <Police />
      </van-tab>
      <!-- <van-tab title="历史数据">
        <HisData />
      </van-tab> -->
      <van-tab title="基本信息">
        <Info />
      </van-tab>
    </van-tabs>
  </div>
</template>
<script>
import Zutai from "./Zutai";
import Police from "./Police";
// import HisData from "./HisData";
import Info from "./Info";

export default {
  components: {
    Zutai,
    Police,
    // HisData,
    Info
  },
  data() {
    return {
      menuActive: 0,
      embedUrl: ""
    };
  },
  mounted() {
    const query = this.$route.query;
    document.title = query.name;
    this.embedUrl = `http://ydzh.yunlink.hn.cn${query.url}`;
  },
  methods: {
    changeTab(name, title) {}
  }
};
</script>

<style scoped lang="scss">
.detail-container {
  min-height: 100vh;
  background: #f5f6f8;
}
</style>
